package com.psd.demo.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.pds.mvc.ActionForward;
import com.pds.mvc.Actions;

public class LoginServlet extends Actions{

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		// 获取到提交的username  
        String username = request.getParameter("username");  
        // 根据取到的值进行不同的跳转  
        if (null != username && !"".equals(username.trim()))  
        {  
            request.setAttribute("username", username.trim());  
            return new ActionForward("result.jsp",true);  
        } else   
        {  
            return new ActionForward("index.jsp", true);  
        }  
	}

}
